home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 5_programming / on / ctcp < prev    next >
Encoding:
Text File  |  2001-03-21  |  1.2 KB  |  39 lines

  1. Synopsis:
  2.    on [<modes>]ctcp [<serial#>] [-|^]<match> { <action> }
  3.  
  4. Description:
  5.    This hook is triggered whenever the client receives a CTCP message,
  6.    whether directly or one sent to a channel it is on.
  7.  
  8. Parameters:
  9.    $0    nickname of CTCP message sender
  10.    $1    target of CTCP (client's nickname or channel name)
  11.    $2    type of CTCP
  12.    $3-   arguments to CTCP command, if any
  13.  
  14. Examples:
  15.    To customize the normal CTCP message:
  16.       on ^ctcp * "*" {
  17.          if ( [$1] == C ) {
  18.             echo *** $0 sent a CTCP $2 to $1${[$3] ? [: $3-] : []}
  19.          } {
  20.             echo *** $0 sent you a CTCP $2${[$3] ? [: $3-] : []}
  21.          }
  22.       }
  23.  
  24. See Also:
  25.    ctcp(1); on(5) ctcp_reply
  26.  
  27. Restrictions:
  28.    Automatic replies from within this hook are limited by the irc protocol.
  29.    Since a CTCP is really just a PRIVMSG, the client may only automatically
  30.    reply with NOTICEs, not MSGs.  Any attempt to send a MSG or CTCP from
  31.    within this hook will result in it automatically being converted to a
  32.    NOTICE (or CTCP REPLY).
  33.  
  34. Other Notes:
  35.    The client's default behavior of automatically responding to certain CTCP
  36.    messages cannot be suppressed with this hook.  To prevent the client from
  37.    replying to CTCPs, use IGNORE.
  38.  
  39.